﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace RiskMan.DataClass.Models
{
    public class BaseCollection<T>
    {
        private ObservableCollection<T> _list = new ObservableCollection<T>( );

        public void RemoveAt ( int index )
        {
            _list.RemoveAt( index );    
        }

        public T this [ int index ]
        {
            get { return _list [ index ]; }
            set { _list [ index ] = value; }
        }

        public ObservableCollection<T> Items
        {
            get { return _list; }
            set { _list = value; }
        }
        
        public void Add ( T item )
        {
            _list.Add( item );
        }

        public void Clear ( )
        {
            _list.Clear( );
        }
    
        public int Count
        {
            get { return  _list.Count; }
        }
    }
}